﻿<!--{inc(header.view.html)}-->


<div class="header">    
  
                       <div class="nav">
	                                 <ul id="nav_list">
                                                 <li><a href="#" class="nav_icon" target="mainframe">广告位列表</a></li>
                                                 <li><a href="index.php?app=adplace&act=add"  target="mainframe">添加广告位</a></li>
	                                 </ul>
                       </div>
                
</div>



<div id="content">
                   <h1>广告位列表</h1>

                  <div>
                                    <div class="tips_show"><img  src="{$web_view_dir}style/images/light.gif" align="absmiddle" /> <b>提示: </b>
                                                                  <span ></span>
                                    </div>




     
<table width="100%" cellspacing="0" cellpadding="4" border="0" align="center"  class="table_style">
<tbody>
<tr>
    <td class="bold" >广告位名称</td>
    <td class="bold" >广告类型</td>
    <td class="bold" >申请购买</td>
    <td class="bold" >点击</td>
    <td class="bold" >调用代码</td>	

	<td class="bold">操作</td>
</tr>

<?php foreach((array)$data as $_key => $_value ) { ?>

<tr  onMouseOut="this.className=''" onMouseOver="this.className='bgcolor'">
	<td  align="center">{$_value.name}</td>
	<td>{$datype[$_value.type]}</a></td>
	<?php
		if( $_value[ifsale] ){
			$_value[ifsale] ='<font color="red">允许购买</font>';
		}else{
			$_value[ifsale] ='禁止购买';
		}
		?>
	<td>{$_value.ifsale}</td>        
	<td>{$_value.hits}</td>  

	<td>
      <input type="hidden" name="hiddenField" value="<SCRIPT LANGUAGE='JavaScript' src='{SITE_URL}/?app=ad&act=js&adid={$_value[keywords]}'></SCRIPT>" id="ja_{$_value[id]}">
      <a href="#" onClick="JM_cc('ja_{$_value[id]}');alert('代码复制成功，你可以粘贴在网页里需要显示的地方,即可显示广告！')"> 
      点击复制代码</a>	
	</td>
	<td>
 	<a href="{$_value[demourl]}" target="_blank" onclick="if('{$_value[demourl]}'=='')alert('本广告位没有设置预览网址');return false;" alt='点击预览'>预览</a>&nbsp; 
      <a href="?app=adplace&act=edit&id={$_value[id]}">修改</a> 
      &nbsp; <a href="?app=adplace&act=del&id={$_value[id]}" onclick="return confirm('你确认要删除这个广告吗?')">删除</a></td>
    
                                               
	                                       
	</td>
</tr>

<?php } ?>



</tbody>
</table>
                        
    
<SCRIPT LANGUAGE="JavaScript">
<!--
function JM_cc(ob){
var obj=document.getElementById(ob); if (obj) { 
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
}
//-->
</SCRIPT>
  

                 </div>

</div>



<!--{inc(footer.view.html)}-->